package com.goldplusgold.tradedelay.app.market.widget.listeners;

import android.content.Context;
import android.gesture.GestureOverlayView;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;

/**
 * Created by Administrator on 2017/7/7.
 */

public class ChartDetectorImpl implements ChartDetectorInterface ,ScaleGestureDetector.OnScaleGestureListener , GestureDetector.OnGestureListener {

    protected GestureDetector mGestureDetector;
    private ScaleGestureDetector mScaleGestureDetector;
    private OnGestureAndScaleInterface onGestureAndScaleInterface;
    public ChartDetectorImpl(Context context){
        mScaleGestureDetector = new ScaleGestureDetector(context,this);
        mGestureDetector = new GestureDetector(context,this);
    }
    @Override
    public boolean onTouchEvent(MotionEvent event) {
        mScaleGestureDetector.onTouchEvent(event);
        mGestureDetector.onTouchEvent(event);
        return false;
    }

    public void setOnGestureAndScaleInterface(OnGestureAndScaleInterface onGestureAndScaleInterface){
        this.onGestureAndScaleInterface = onGestureAndScaleInterface;
    }


    @Override
    public boolean onScale(ScaleGestureDetector detector) {
        return false;
    }

    @Override
    public boolean onScaleBegin(ScaleGestureDetector detector) {
        return false;
    }

    @Override
    public void onScaleEnd(ScaleGestureDetector detector) {

    }

    @Override
    public boolean onDown(MotionEvent e) {
        return false;
    }

    @Override
    public void onShowPress(MotionEvent e) {

    }

    @Override
    public boolean onSingleTapUp(MotionEvent e) {
        return false;
    }

    @Override
    public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
        return false;
    }

    @Override
    public void onLongPress(MotionEvent e) {

    }

    @Override
    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
        return false;
    }
}
